try{
document.domain="xiaonei.com";
}
catch(e){
}
function isUndefined(_1){
return typeof _1=="undefined";
}
function isString(_2){
return typeof _2=="string";
}
function isElement(_3){
return _3&&_3.nodeType==1;
}
function isFunction(_4){
return typeof _4=="function";
}
function isObject(_5){
return typeof _5=="object";
}
function isArray(_6){
return Object.prototype.toString.call(_6)==="[object Array]";
}
function isNumber(_7){
return typeof _7=="number";
}
function $extend(_8,_9){
if(!_9){
return _8;
}
for(var p in _9){
_8[p]=_9[p];
}
return _8;
}
(function(){
var _b={};
$element=function(_c){
_c=_c.toLowerCase();
if(!_b[_c]){
_b[_c]=document.createElement(_c);
}
return $(_b[_c].cloneNode(false));
};
})();
function $(id){
var el;
if(isString(id)||isNumber(id)){
el=document.getElementById(id+"");
}else{
el=id;
}
if(!el){
return null;
}
if(!el._extendLevel){
XN.element.extend(el);
}
return el;
}
xn_getEl=$;
if(!Function.prototype.bind){
Function.prototype.bind=function(_f){
var _10=this;
return function(){
_10.apply(_f,arguments);
};
};
}
ge=getEl=$;
$xElement=$element;
$X=$;
var XN={namespace:function(){
var a=arguments,o=null,i,j,d;
for(i=0;i<a.length;i++){
d=a[i].split(".");
o=XN;
for(j=(d[0]=="XN")?1:0;j<d.length;j++){
o[d[j]]=o[d[j]]||{};
o=o[d[j]];
}
}
return o;
}};
XN.namespace("ui");
XN.namespace("util");
XN.namespace("app");
XN.namespace("page");
XN.namespace("config");
XN.APP=XN.App=XN.app;
XN.PAGE=XN.Page=XN.page;
XN.CONFIG=XN.Config=XN.config;
XN.DEBUG_MODE=false;
XN.debug={log:function(){
},on:function(){
XN.DEBUG_MODE=true;
if(window.console&&console.log){
XN.debug.log=function(s){
console.log(s);
};
}
},off:function(){
XN.debug.log=function(){
};
}};
XN.log=function(s){
XN.debug.log(s);
};
XN.DEBUG=XN.Debug=XN.debug;
XN.debug.On=XN.debug.on;
XN.debug.Off=XN.debug.off;
XN.env={domain:"xiaonei.com",staticRoot:"http://s.xnimg.cn/",swfRoot:"http://static.xiaonei.com/",wwwRoot:"http://xiaonei.com/"};
XN.ENV=XN.Env=XN.env;
XN.array={toQueryString:function(a,key){
var rt=[],t;
for(var k in a){
t=a[k];
if(isFunction(t)){
continue;
}
if(isObject(t)){
rt.push(arguments.callee(t,k));
}else{
if(/^\d+$/.test(k)){
rt.push((key||k)+"="+encodeURIComponent(t));
}else{
rt.push(k+"="+encodeURIComponent(t));
}
}
}
return rt.join("&");
},each:function(a,_1e){
if(!a){
return;
}
if(!isUndefined(a.length)||!isUndefined(a[0])){
for(var i=0,j=a.length;i<j;i++){
if(_1e.call(a,i,a[i])===false){
break;
}
}
}else{
for(var key in a){
if(!isFunction(a[key])){
if(_1e.call(a,key,a[key])===false){
break;
}
}
}
}
},include:function(a,_23){
var r=false;
XN.array.each(a,function(i,v){
if(v===_23){
r=true;
return false;
}
});
return r;
},build:function(o){
var rt=[];
for(var i=0,j=o.length;i<j;i++){
rt.push(o[i]);
}
return rt;
}};
XN.ARRAY=XN.Array=XN.array;
XN.string={nl2br:function(str){
return str.replace(/([^>])\n/g,"$1<br />");
},trim:function(str){
return str.replace(/^\s+|\s+$/g,"");
},ltrim:function(str){
return str.replace(/^\s+/,"");
},rtrim:function(str){
return str.replace(/\s+$/,"");
},strip:function(str){
return XN.string.trim(str);
},stripTags:function(str){
return str.replace(/<\/?[^>]+>/igm,"");
},escapeHTML:function(str){
return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
},unescapeHTML:function(str){
return str.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;/g," ").replace(/&quot;/g,"\"").replace(/&amp;/g,"&");
},include:function(str,key){
return str.indexOf(key)>-1;
},startsWith:function(str,key){
return str.indexOf(key)===0;
},endsWith:function(str,key){
var d=str.length-key.length;
return d>=0&&str.lastIndexOf(key)===d;
},isBlank:function(str){
return /^\s*$/.test(str);
},isEmail:function(str){
return /^[A-Z_a-z0-9-\.]+@([A-Z_a-z0-9-]+\.)+[a-z0-9A-Z]{2,4}$/.test(str);
},isMobile:function(str){
return /^((\(\d{2,3}\))|(\d{3}\-))?((1[345]\d{9})|(18[89]\d{8}))$/.test(str);
},isUrl:function(str){
return /^(http:|ftp:)\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"])*$/.test(str);
},isIp:function(str){
return /^(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])$/.test(str);
},isNumber:function(str){
return /^\d+$/.test(str);
},isZip:function(str){
return /^[1-9]\d{5}$/.test(str);
},isEN:function(str){
return /^[A-Za-z]+$/.test(str);
},isJSON:function(str){
if(!isString(str)||str===""){
return false;
}
str=str.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");
return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
},getQuery:function(key,url){
url=url||window.location.href;
if(url.indexOf("#")!==-1){
url=url.substring(0,url.indexOf("#"));
}
var rts=[],rt;
queryReg=new RegExp("(^|\\?|&)"+key+"=([^&]*)(?=&|#|$)","g");
while((rt=queryReg.exec(url))!=null){
rts.push(decodeURIComponent(rt[2]));
}
if(rts.length==0){
return null;
}
if(rts.length==1){
return rts[0];
}
return rts;
},setQuery:function(key,_48,url){
url=url||window.location.href;
var _4a="";
if(url.indexOf("#")!==-1){
_4a=url.substring(url.indexOf("#"));
}
url=url.replace(_4a,"");
url=url.replace(new RegExp("(^|\\?|&)"+key+"=[^&]*(?=&|#|$)","g"),"");
_48=isArray(_48)?_48:[_48];
for(var i=_48.length-1;i>=0;i--){
_48[i]=encodeURIComponent(_48[i]);
}
var p=key+"="+_48.join("&"+key+"=");
return url+(/\?/.test(url)?"&":"?")+p+_4a;
}};
XN.String=XN.STRING=XN.string;
XN.string.isNum=XN.string.isNumber;
window.isJSON=XN.string.isJSON;
(function(){
runOnceFunc={};
XN.func={empty:function(){
},runOnce:function(_4d){
if(runOnceFunc[_4d]){
return null;
}
runOnceFunc[_4d]=true;
return _4d();
}};
})();
XN.FUNC=XN.Func=XN.func;
(function(){
XN.browser={IE:!!(window.attachEvent&&!window.opera),IE6:navigator.userAgent.indexOf("MSIE 6.0")>-1,IE7:navigator.userAgent.indexOf("MSIE 7.0")>-1,Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,copy:function(o){
function onfail(){
if(isElement(o)){
o.select();
}
}
var str;
if(isElement(o)){
str=o.value;
}else{
str=o;
}
if(window.clipboardData&&clipboardData.setData){
if(clipboardData.setData("text",str)){
return true;
}
}else{
XN.DO.alert({message:"\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u811a\u672c\u590d\u5236,\u8bf7\u5c1d\u8bd5\u624b\u52a8\u590d\u5236",callBack:function(){
onfail();
}});
return false;
}
XN.DO.alert({message:"\u60a8\u7684\u6d4f\u89c8\u5668\u8bbe\u7f6e\u4e0d\u5141\u8bb8\u811a\u672c\u8bbf\u95ee\u526a\u5207\u677f",callBack:function(){
onfail();
}});
return false;
}};
})();
XN.BROWSER=XN.Browser=XN.browser;
XN.cookie={get:function(_50){
var _51=_50+"=";
var ca=document.cookie.split(";");
for(var i=0;i<ca.length;i++){
var c=ca[i];
while(c.charAt(0)==" "){
c=c.substring(1,c.length);
}
if(c.indexOf(_51)==0){
return decodeURIComponent(c.substring(_51.length,c.length));
}
}
return null;
},set:function(_55,_56,_57,_58,_59,_5a){
var _5b;
if(isNumber(_57)){
var _5c=new Date();
_5c.setTime(_5c.getTime()+(_57*24*60*60*1000));
_5b=_5c.toGMTString();
}else{
if(isString(_57)){
_5b=_57;
}else{
_5b=false;
}
}
document.cookie=_55+"="+encodeURIComponent(_56)+(_5b?";expires="+_5b:"")+(_58?";path="+_58:"")+(_59?";domain="+_59:"")+(_5a?";secure":"");
},del:function(_5d,_5e,_5f,_60){
XN.cookie.set(_5d,"",-1,_5e,_5f,_60);
}};
XN.COOKIE=XN.Cookie=XN.cookie;
(function(){
var _61=XN.browser;
XN.event={isCapsLockOn:function(e){
var c=e.keyCode||e.which;
var s=e.shiftKey;
if(((c>=65&&c<=90)&&!s)||((c>=97&&c<=122)&&s)){
return true;
}
return false;
},element:function(e){
var n=e.target||e.srcElement;
return _67.resolveTextNode(n);
},relatedTarget:function(e){
var t=e.relatedTarget;
if(!t){
if(e.type=="mouseout"||e.type=="mouseleave"){
t=e.toElement;
}else{
if(e.type=="mouseover"){
t=e.fromElement;
}
}
}
return _67.resolveTextNode(t);
},resolveTextNode:function(n){
try{
if(n&&3==n.nodeType){
return n.parentNode;
}
}
catch(e){
}
return n;
},pointerX:function(_6b){
return _6b.pageX||(_6b.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
},pointerY:function(_6c){
return _6c.pageY||(_6c.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
},isStrictMode:document.compatMode!="BackCompat",pageHeight:function(){
return this.isStrictMode?Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight):Math.max(document.body.scrollHeight,document.body.clientHeight);
},pageWidth:function(){
return this.isStrictMode?Math.max(document.documentElement.scrollWidth,document.documentElement.clientWidth):Math.max(document.body.scrollWidth,document.body.clientWidth);
},winWidth:function(){
return this.isStrictMode?document.documentElement.clientWidth:document.body.clientWidth;
},winHeight:function(){
return this.isStrictMode?document.documentElement.clientHeight:document.body.clientHeight;
},scrollTop:function(){
if(XN.browser.WebKit){
return window.pageYOffset;
}
return this.isStrictMode?document.documentElement.scrollTop:document.body.scrollTop;
},scrollLeft:function(){
if(XN.browser.WebKit){
return window.pageXOffset;
}
return this.isStrictMode?document.documentElement.scrollLeft:document.body.scrollLeft;
},stop:null,addEvent:null,delEvent:null,enableCustomEvent:function(obj){
$extend(obj,{addEvent:function(_6e,_6f){
if(!this._customEventListeners){
this._customEventListeners={};
}
var _70=this._customEventListeners;
if(isUndefined(_70[_6e])){
_70[_6e]=[];
}
_70[_6e].push(_6f);
return this;
},delEvent:function(_71,_72){
var _73=this._customEventListeners[_71];
if(_73){
for(var i=_73.length-1;i>=0;i--){
if(_73[i]==_72){
_73[i]=null;
break;
}
}
}
return this;
},fireEvent:function(_75){
if(!this._customEventListeners||!this._customEventListeners[_75]){
return;
}
var _76=this._customEventListeners[_75],ars=XN.array.build(arguments);
ars.shift();
for(var i=0,j=_76.length;i<j;i++){
if(_76[i]){
_76[i].apply(this,ars);
}
}
}});
return obj;
}};
var _67=XN.event;
if(_61.IE){
_67.stop=function(_7a){
_7a.returnValue=false;
_7a.cancelBubble=true;
};
}else{
_67.stop=function(_7b){
_7b.preventDefault();
_7b.stopPropagation();
};
}
var _7c=function(_7d,_7e){
var p=_7d.relatedTarget;
while(p&&p!=_7e){
try{
p=p.parentNode;
}
catch(error){
p=_7e;
}
}
return p!==_7e;
};
if(window.attachEvent&&!_61.Opera){
_67.addEvent=function(_80,_81,_82){
_80=$(_80);
if(_81=="keypress"){
_81="keydown";
}
if(_81=="input"){
_81="propertychange";
}
_80.attachEvent("on"+_81,_82);
return _80;
};
_67.delEvent=function(_83,_84,_85){
_83=$(_83);
if(_84=="keypress"){
_84="keydown";
}
if(_84=="input"){
_84="propertychange";
}
_83.detachEvent("on"+_84,_85);
return _83;
};
}else{
if(window.addEventListener){
_67.addEvent=function(_86,_87,_88,_89){
_86=$(_86);
if(_87=="mouseleave"){
_86.onmouseleave=function(e){
e=e||window.event;
if(_7c(e,_86)&&_88){
_88.call(_86,e);
}
};
_86.addEventListener("mouseout",_86.onmouseleave,_89);
return _86;
}
if(_87=="keypress"&&_61.WebKit){
_87="keydown";
}
_86.addEventListener(_87,_88,_89);
return _86;
};
_67.delEvent=function(_8b,_8c,_8d,_8e){
_8b=$(_8b);
if(_8c=="mouseleave"){
_8b.removeEventListener("mouseout",_8b.onmouseleave,_8e);
return _8b;
}
if(_8c=="keypress"&&_61.WebKit){
_8c="keydown";
}
_8b.removeEventListener(_8c,_8d,_8e);
return _8b;
};
}
}
})();
XN.EVENT=XN.Event=XN.event;
(function(){
var _8f=XN.event;
var _90=XN.array;
var _91=XN.browser;
var _92=false;
var _93=[];
function runHooks(){
if(!_93){
return;
}
XN.array.each(_93,function(i,v){
try{
v();
}
catch(e){
if(XN.DEBUG_MODE){
throw e;
}
}
});
}
var _96=null;
function createShadow(_97){
_97=_97||0.3;
var el=$element("div");
_96=el;
el.setStyle(["position:absolute;","top:0;","left:0;","background:#000;","z-index:2000;","opacity:"+_97+";","filter:alpha(opacity="+(_97*100)+");"].join(""));
el.innerHTML=["<iframe width=\"100%\" height=\"100%\" frameBorder=\"0\" style=\"position:absolute;top:0;left:0;z-index:1;\"></iframe>","<div style=\"position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000000;z-index:2;height:expression(this.parentNode.offsetHeight);\"></div>"].join("");
function resize(){
el.hide();
el.style.height=XN.event.pageHeight()+"px";
el.style.width=XN.event.pageWidth()+"px";
el.show();
}
resize();
XN.event.addEvent(window,"resize",function(e){
if(_96&&_96.style.display!="none"){
try{
resize();
}
catch(e){
}
}
});
document.body.appendChild(el);
}
XN.dom={disable:function(_9a){
if(!_96){
createShadow(_9a);
}
},enable:function(){
if(_96){
_96.remove();
_96=null;
}
},insertAfter:function(_9b,_9c){
_9b=$(_9b);
_9c=$(_9c);
var _9d=_9c.parentNode;
if(_9d.lastChild==_9c){
_9d.appendChild(_9b);
}else{
_9d.insertBefore(_9b,_9c.nextSibling);
}
},getElementsByClassName:function(_9e,_9f,_a0){
var c=($(_9f)||document).getElementsByTagName(_a0||"*")||document.all;
var _a2=[];
var _a3=new RegExp("(^|\\s)"+_9e+"(\\s|$)");
_90.each(c,function(i,v){
if(_a3.test(v.className)){
_a2.push(v);
}
});
return _a2;
},ready:function(f){
_92?f():_93.push(f);
},preloadImg:function(src){
src=isArray(src)?src:[src];
_90.each(src,function(i,v){
new Image().src=v;
});
}};
if(_91.WebKit){
var _aa=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
_92=true;
runHooks();
clearInterval(_aa);
}
},10);
}else{
if(document.addEventListener){
document.addEventListener("DOMContentLoaded",function(){
_92=true;
runHooks();
},false);
}else{
var _aa=setInterval(function(){
try{
document.body.doScroll("left");
clearInterval(_aa);
_92=true;
runHooks();
}
catch(e){
}
},20);
}
}
})();
XN.DOM=XN.Dom=XN.dom;
XN.dom.readyDo=XN.dom.ready;
XN.dom.ready(function(){
$=ge=getEl=xn_getEl;
});
XN.dom.ready(function(){
if(XN.config.parentDomain&&XN.config.parentDomain==top.location.host){
return;
}
try{
top.location.href.indexOf("x");
}
catch(e){
try{
top.location=self.location;
}
catch(e){
}
}
});
(function(){
var _ab={};
var _ac={};
function hasLoad(_ad){
return !!getFile(_ad);
}
function getFile(_ae){
return _ab[encodeURIComponent(_ae)];
}
function mark(_af){
var obj={};
obj.file=_af;
obj.isLoad=true;
obj.isLoaded=true;
_ab[encodeURIComponent(_af)]=obj;
}
function addFile(_b1){
var obj={};
obj.file=_b1;
obj.isLoaded=false;
XN.EVENT.enableCustomEvent(obj);
obj.addEvent("load",function(){
this.isLoaded=true;
});
_ab[encodeURIComponent(_b1)]=obj;
var el=$element("script");
el.type="text/javascript";
el.src=_b1;
obj.element=el;
if(XN.Browser.IE){
el.onreadystatechange=function(){
if((this.readyState=="loaded"||this.readyState=="complete")&&!this.hasLoad){
this.hasLoad=true;
getFile(_b1).fireEvent("load");
}
};
}else{
el.onload=function(){
getFile(_b1).fireEvent("load");
};
}
document.getElementsByTagName("head")[0].appendChild(el);
}
function loadFile(_b4,_b5){
_b4=getFullName(_b4);
if(/\.js(\?|$)/.test(_b4)){
if(!hasLoad(_b4)){
addFile(_b4);
}
if(!_b5){
return;
}
if(getFile(_b4).isLoaded){
_b5.call(getFile(_b4));
}else{
getFile(_b4).addEvent("load",_b5);
}
}else{
if(/\.css(\?|$)/.test(_b4)){
if(hasLoad(_b4)){
return;
}
mark(_b4);
var el=$element("link");
el.rel="stylesheet";
el.type="text/css";
el.href=_b4;
document.getElementsByTagName("head")[0].appendChild(el);
if(_b5){
_b5.call(getFile(_b4));
}
}
}
}
function getFullName(_b7){
XN.func.runOnce(loadVersion);
if(!_ac[_b7]){
return _b7;
}
return _ac[_b7].file;
}
function getVersion(_b8){
var _b9;
if(_b9=new RegExp("("+XN.env.staticRoot+")"+"(\\d+)/([^?]*)").exec(_b8)){
_ac[_b9[1]+_b9[3]]={file:_b8,version:_b9[2]};
}else{
if(_b9=new RegExp("(.*)\\?ver=(d+)(..*)").exec(_b8)){
_ac[_b9[1]]={file:_b8,version:_b9[2]};
}
}
}
XN.getFileVersion=function(_ba){
XN.array.each(_ba,function(i,v){
getVersion(v);
});
};
XN.loadFile=function(_bd,_be){
loadFile(_bd,_be);
};
XN.loadFiles=function(_bf,_c0){
var f=_bf.length;
function isAllLoad(){
f--;
if(f===0&&_c0){
_c0();
}
}
XN.array.each(_bf,function(i,v){
XN.loadFile(v,isAllLoad);
});
};
XN.getVersion=function(_c4){
getVersion(_c4);
};
function loadVersion(){
XN.array.each(document.getElementsByTagName("script"),function(i,v){
if(v.src){
mark(v.src);
getVersion(v.src);
}
if(v.getAttribute("vsrc")){
getVersion(v.getAttribute("vsrc"));
}
});
XN.array.each(document.getElementsByTagName("link"),function(i,v){
if(v.rel&&v.rel=="stylesheet"){
mark(v.href);
getVersion(v.href);
}
if(v.getAttribute("vhref")){
getVersion(v.getAttribute("vhref"));
}
});
XN.log("load file version:");
XN.log(_ac);
}
XN.dynamicLoad=function(_c9){
XN.array.each(_c9.funcs,function(i,_cb){
window[_cb]=function(){
var ars=arguments;
window[_cb]=null;
if(_c9.file){
_c9.files=[_c9.file];
}
XN.loadFiles(_c9.files,function(){
window[_cb].apply(null,ars);
if(_c9.callBack){
_c9.callBack.call(null);
}
});
};
});
};
XN.namespace("img");
XN.img.getVersion=function(_cd){
XN.func.runOnce(loadVersion);
if(!_ac[_cd]){
return "";
}
return _ac[_cd].version;
};
XN.img.getFullName=function(_ce){
return getFullName(_ce);
};
})();
(function(){
var _cf=XN.event.addEvent;
var _d0=XN.event.delEvent;
var _d1=XN.browser;
XN.element={clear:function(_d2){
_d2=$(_d2);
_d2.innerHTML="";
return _d2;
},hover:function(_d3,_d4,_d5){
_d3=$(_d3);
_d5=_d5?$(_d5):_d3;
_cf(_d3,"mouseover",function(){
_d5.addClass(_d4);
},false);
_cf(_d3,"mouseleave",function(){
_d5.delClass(_d4);
},false);
return _d3;
},scrollTo:function(_d6,_d7){
_d6=$(_d6);
_d7=_d7||"normal";
switch(_d7){
case "slow":
XN.EFFECT.scrollTo(_d6);
break;
default:
window.scrollTo(0,_d6.realTop());
break;
}
return _d6;
},visible:function(_d8){
_d8=$(_d8);
return _d8.style.display!="none"&&_d8.style.visibility!="hidden";
},toggleClass:function(_d9,_da){
if(_db.hasClassName(_d9,_da)){
_db.delClass(_d9,_da);
}else{
_db.addClass(_d9,_da);
}
return $(_d9);
},hasClassName:function(_dc,_dd){
return new RegExp("(^|\\s+)"+_dd+"(\\s+|$)").test($(_dc).className);
},addClass:function(_de,_df){
_de=$(_de);
if(_db.hasClassName(_de,_df)){
return _de;
}
_de.className+=" "+_df;
return _de;
},delClass:function(_e0,_e1){
_e0=$(_e0);
_e0.className=_e0.className.replace(new RegExp("(^|\\s+)"+_e1+"(\\s+|$)","g"),"");
return _e0;
},show:function(_e2,_e3){
_e2=$(_e2);
if(_e2.style.display!="none"){
return;
}
_e3=_e3||"normal";
switch(_e3){
case "normal":
_e2.style.display="";
break;
case "fade":
XN.EFFECT.fadeIn(_e2,function(e){
e.style.display="";
});
break;
case "slide":
XN.EFFECT.slideOpen(_e2);
break;
case "delay":
setTimeout(function(){
_e2.style.display="";
},2000);
break;
}
return _e2;
},hide:function(_e5,_e6){
_e5=$(_e5);
if(_e5.style.display=="none"){
return;
}
_e6=_e6||"normal";
switch(_e6){
case "normal":
_e5.style.display="none";
break;
case "fade":
XN.EFFECT.fadeOut(_e5,function(e){
e.style.display="none";
});
break;
case "slide":
XN.EFFECT.slideClose(_e5);
break;
case "delay":
setTimeout(function(){
_e5.style.display="none";
},2000);
break;
}
return _e5;
},remove:function(_e8){
var _e8=$(_e8);
_e8.parentNode.removeChild(_e8);
return _e8;
},setStyle:function(_e9,_ea){
var _e9=$(_e9);
_e9.style.cssText+=";"+_ea;
return _e9;
},getStyle:function(_eb,_ec){
_eb=$(_eb);
_ec=_ec=="float"?"cssFloat":_ec;
var _ed=_eb.style[_ec];
if(!_ed){
var css=document.defaultView.getComputedStyle(_eb,null);
_ed=css?css[_ec]:null;
}
if(_ec=="opacity"){
return _ed?parseFloat(_ed):1;
}
return _ed=="auto"?null:_ed;
},addEvent:function(){
_cf.apply(null,arguments);
return arguments[0];
},delEvent:function(){
_d0.apply(null,arguments);
return arguments[0];
},addChild:function(_ef,_f0){
_ef=$(_ef);
if(isString(_f0)){
var _f1=(_f0.substring(0,1)=="#")?$(_f0.substring(1,_f0.length)):_f0;
if(isString(_f1)){
_ef.innerHTML+=_f1;
}else{
_ef.appendChild(_f1);
}
}else{
if(isElement(_f0)){
_ef.appendChild(_f0);
}else{
if(_f0.iAmUIelement){
_ef.appendChild($(_f0.frame));
}else{
if(_f0.iAmXmlhttp){
_f0.fillTo=_ef;
_ef.startLoading();
}
}
}
}
return _ef;
},delChild:function(_f2,_f3){
_f3=$(_f3);
_f3.remove();
return $(_f2);
},setContent:function(_f4,c){
_f4=$(_f4);
_f4.innerHTML="";
_f4.addChild(c);
return _f4;
},getPosition:function(_f6,_f7){
_f7=$(_f7)||document.body;
_f6=$(_f6);
var rl=0;
var rt=0;
var p=_f6;
try{
while(p&&p!=_f7){
rl+=p.offsetLeft;
rt+=p.offsetTop;
p=p.offsetParent;
}
}
catch(e){
}
return {"left":rl,"top":rt};
},realLeft:function(_fb,p){
return _db.getPosition(_fb,p||null).left;
},realTop:function(_fd,p){
return _db.getPosition(_fd,p||null).top;
},startLoading:function(_ff,msg){
_ff=$(_ff);
_ff.innerHTML="<center><img src=\""+XN.ENV.staticRoot+"img/indicator.gif\" />"+(msg||"\u52a0\u8f7d\u4e2d...")+"</center>";
return _ff;
},stopLoading:function(_101){
_101=$(_101);
return _101;
}};
XN.element.extend=function(_102){
if(_102._extendLevel){
return _102;
}
var _103=_db.extend.cache;
for(var m in _db){
if(!(m in _102)){
_102[m]=_103.findOrStore(_db[m]);
}
}
return _102;
};
XN.element.extend.cache={findOrStore:function(_105){
return this[_105]=this[_105]||function(){
return _105.apply(null,[this].concat(XN.array.build(arguments)));
};
}};
var _db=XN.element;
if(_d1.IE){
XN.element.getStyle=function(_106,_107){
_106=$(_106);
_107=(_107=="float"||_107=="cssFloat")?"styleFloat":_107;
var _108=_106.style[_107];
if(!_108&&_106.currentStyle){
_108=_106.currentStyle[_107];
}
if(_107=="opacity"){
if(_108=(_106.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_108[1]){
return parseFloat(_108[1])/100;
}
}
return 1;
}
if(_108=="auto"){
if((_107=="width"||_107=="height")&&(_106.getStyle("display")!="none")){
return _106["offset"+(_107=="width"?"Width":"Height")]+"px";
}
return null;
}
return _108;
};
}
if(document.addEventListener){
XN.element.setOpacity=function(_109,_10a){
_109=$(_109);
_109.style.opacity=_10a;
return _109;
};
}else{
XN.element.setOpacity=function(_10b,_10c){
_10b=$(_10b);
_10b.style.zoom=1;
_10b.style.filter="Alpha(opacity="+Math.ceil(_10c*100)+")";
return _10b;
};
}
})();
XN.ELEMENT=XN.Element=XN.element;
XN.namespace("net");
XN.net.proxys={};
XN.net.sendForm=function(_10d){
XN.log("send form");
_10d.data=XN.FORM.serialize(_10d.form);
return new XN.net.xmlhttp(_10d);
};
XN.net.xmlhttp=function(_10e){
var This=this;
if(!XN.net.cache){
XN.net.cache=new XN.util.cache();
}
var ars=arguments;
if(ars.length>1){
this.url=ars[0]||null;
this.data=ars[1]||"";
this.onSuccess=ars[2];
$extend(this,ars[3]);
init(window);
return this;
}
$extend(this,_10e);
var _111;
if(this.useCache&&(_111=XN.net.cache.get(this.url+encodeURIComponent(this.data)))){
this.transport={};
this.transport.responseText=_111;
setTimeout(function(){
This._onComplete();
This._onSuccess();
},0);
return this;
}
function getDomain(link){
var a=$element("a");
a.href=link;
return a.hostname;
}
if(/^http/.test(this.url)){
var cd=getDomain(window.location.href);
var nd=getDomain(this.url);
if(cd!=nd){
if(XN.net.proxys[nd]){
init(XN.net.proxys[nd]);
return This;
}else{
var _116=$element("iframe").hide();
document.body.appendChild(_116);
_116.src="http://"+nd+"/ajaxProxy.html?ver=2";
XN.event.addEvent(_116,"load",function(){
try{
init(_116.contentWindow);
XN.net.proxys[nd]=_116.contentWindow;
}
catch(e){
}
});
return This;
}
}else{
init(window);
}
}else{
init(window);
}
function init(w){
This.transport=This.getTransport(w);
if(This.url&&This.url!==""){
This.send(This.method);
}
}
};
XN.net.xmlhttp.prototype={url:null,data:"",onSuccess:null,onFailure:null,onError:null,fillTo:null,method:"post",asynchronous:true,transport:null,headers:null,iAmXmlhttp:true,useCache:false,abort:function(){
this.transport.abort();
},send:function(_118){
var _url;
if(_118=="get"&&this.data!==""){
_url=this.url+(/\?/.test(this.url)?"&":"?")+this.data;
}else{
_url=this.url;
}
if(this.asynchronous){
this.transport.onreadystatechange=this.onStateChange.bind(this);
}
this.transport.open(_118,_url,this.asynchronous);
this.transport.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
if(this.headers!==null){
for(var i in this.headers){
this.transport.setRequestHeader(i,this.headers[i]);
}
}
this.transport.send(_118=="post"?this.data:null);
},_onSuccess:function(obj){
var _11c=this.transport;
if(this.fillTo!==null){
try{
this.fillTo.stopLoading();
}
catch(e){
}
this.fillTo.innerHTML=_11c.responseText;
}
try{
if(this.onSuccess){
this.onSuccess.call(null,_11c);
}
}
catch(e){
if(XN.DEBUG_MODE){
throw e;
}
}
},_onComplete:function(obj){
var _11e=this.transport;
try{
if(this.onComplete){
this.onComplete.call(null,_11e);
}
}
catch(e){
if(XN.DEBUG_MODE){
throw e;
}
}
},onStateChange:function(){
var _11f=this.transport;
if(_11f.readyState==4){
this._onComplete();
if(_11f.status==undefined||_11f.status==0||(_11f.status>=200&&_11f.status<300)){
if(this.useCache){
XN.net.cache.add(this.url+encodeURIComponent(this.data),this.transport.responseText);
}
this._onSuccess();
}else{
(this.onError||this.onFailure||XN.func.empty).call(null,_11f);
}
}
}};
if(XN.browser.IE){
XN.net.xmlhttp.prototype.getTransport=function(w){
if(w!==window){
return w.getTransport();
}
try{
return new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
return new ActiveXObject("Microsoft.XMLHTTP");
}
};
}else{
XN.net.xmlhttp.prototype.getTransport=function(w){
if(w!==window){
return w.getTransport();
}
return new XMLHttpRequest();
};
}
XN.NET=XN.Net=XN.net;
XN.net.ajax=XN.net.xmlhttp;
$extend(XN.net.xmlhttp.prototype,{get:function(url,data,_124,_125){
this.url=url;
this.data=data;
this.onSuccess=_124;
$extend(this,_125);
this.send("get");
},post:function(url,data,_128,_129){
this.url=url;
this.data=data;
this.onSuccess=_128;
$extend(this,_129);
this.send("post");
}});
if(typeof Ajax=="undefined"){
Ajax={};
Ajax.Request=function(url,o){
var p=o.parameters;
o["url"]=url;
o["data"]=p;
delete o.parameters;
return new XN.net.xmlhttp(o);
};
}
XN.template={};
XN.template.mediaPlayer=function(o){
return ["<object classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" width=\""+(o.width||"352")+"\" height=\""+(o.height||"70")+"\" >\n","<param name=\"autostart\" value=\""+(o.autostart||"1")+"\" >\n","<param name=\"showstatusbar\" value=\""+(o.showstatusbar||"1")+"\">\n","<param name=\"filename\" value=\""+o.filename+"\">\n","<embed type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" ","flename=\"mp\"","autostart=\""+(o.autostart||"1")+"\" showstatusbar=\""+(o.showstatusbar||"1")+"\" ","src=\""+o.filename+"\" width=\""+(o.width||"352")+"\" height=\""+(o.height||"70")+"\"></embed>"].join("");
};
XN.template.flashPlayer=function(o){
return "<embed src=\""+XN.ENV.staticRoot+"/swf/player.swf?url="+o.filename+"&Rwid="+(o.width||"450")+"&Autoplay="+(o.autostart||"1")+"\" wmode=\""+(o.wmode||"transparent")+"\" loop=\"false\" menu=\"false\" quality=\"high\" scale=\"noscale\" salign=\"lt\" bgcolor=\"#ffffff\" width=\""+(o.width||"450")+"\" height=\""+(o.height||"30")+"\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
};
XN.template.flash=function(o){
return "&nbsp;<embed src=\""+o.filename+"\" type=\"application/x-shockwave-flash\" "+"width=\""+(o.width||"320")+"\" height=\""+(o.height||"240")+"\" allowFullScreen=\"true\" wmode=\""+(o.wmode||"transparent")+"\" allowScriptAccess=\"always\"></embed>";
};
XN.Template=XN.TEMPLATE=XN.template;
XN.namespace("util");
XN.util.cache=function(_130){
$extend(this,_130);
this._cacheData=[];
};
XN.util.cache.prototype={cacheLength:null,_cacheData:null,isExist:function(key){
return this.get(key);
},add:function(key,_133){
if(!isUndefined(this.isExist(key))){
return;
}
if(this.cacheLength&&this.cacheLength==this._cacheData.length){
this._cacheData.shift();
}
this._cacheData.push({"key":key,"value":_133});
},get:function(key){
for(var i=this._cacheData.length-1;i>=0;i--){
if(this._cacheData[i].key==key){
return this._cacheData[i].value;
}
}
},clear:function(){
this._cacheData=[];
}};
XN.UTIL=XN.Util=XN.util;
XN.util.DS_JSON=function(p){
$extend(this,p);
};
XN.util.DS_JSON.prototype={DS_TYPE:"JSON",url:null,queryParam:"query",attachParam:"",rootKey:null,_request:null,query:function(v,_138){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_JSON(r){
r=r.responseText;
var pp;
try{
var rt=XN.JSON.parse(r);
if(This.rootKey&&rt[This.rootKey]){
pp=rt[This.rootKey];
}else{
pp=rt;
}
}
catch(e){
pp=[];
}
_138(pp);
}
this._request=new XN.net.xmlhttp({url:this.url,data:this.queryParam+"="+encodeURIComponent(v)+"&"+this.attachParam,method:"get",onSuccess:parseDS_JSON});
}};
XN.ui.DS_JSON=XN.util.DS_JSON;
XN.util.DS_friends=function(p){
var ds=new XN.util.DS_JSON(p);
ds.queryParam="p";
ds.rootKey="candidate";
ds.net="";
ds.group="";
ds.param=XN.json.build(p.param||{});
var _13f=isUndefined(p.limit)?24:p.limit;
ds.query=function(name,_141){
XN.log("start query");
name=name.replace(/[^a-zA-Z\u0391-\uFFE5]/g,"");
if(XN.string.isBlank(name)&&this.group==""&&this.net==""){
_141([]);
return;
}
var p=["{\"init\":false,","\"qkey\":\""+this.qkey+"\",","\"uid\":true,","\"uname\":true,","\"uhead\":true,","\"limit\":"+_13f+",","\"param\":"+this.param+",","\"query\":\""+name+"\",","\"group\":\""+this.group+"\",","\"net\":\""+this.net+"\"","}"].join("");
XN.util.DS_JSON.prototype.query.call(this,p,_141);
};
return ds;
};
XN.ui.DS_friends=XN.util.DS_friends;
XN.util.DS_Array=function(p){
$extend(this,p);
this.init();
};
XN.util.DS_Array.prototype={DS_TYPE:"array",data:null,searchKey:null,init:function(){
var key=this.searchKey,_145=this._index=[];
XN.array.each(this.data,function(i,v){
_145.push(v[key]);
});
},query:function(v,_149){
_149(this._search(v));
},_search:function(v){
var keys=this._index,data=this.data,rt=[],reg=new RegExp("^"+v,"i");
XN.array.each(keys,function(i,v){
if(reg.test(v)){
rt.push(data[i]);
}
});
return rt;
}};
XN.ui.DS_Array=XN.util.DS_Array;
XN.util.DS_XHR=function(p){
$extend(this,p);
};
XN.util.DS_XHR.prototype={url:null,queryParam:"query",_request:null,query:function(v,_153){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_XML(r){
r=r.responseXML;
var rt=[];
function getResult(r){
var tmp={};
XN.array.each(r.childNodes,function(i,v){
tmp[v.tagName.toLowerCase()]=v.firstChild.nodeValue;
});
return tmp;
}
try{
var rs=r.getElementsByTagName("Result");
XN.array.each(rs,function(i,v){
rt.push(getResult(v));
});
}
catch(e){
rt=[];
}
_153(rt);
}
this._request=new XN.net.xmlhttp({url:this.url,data:this.queryParam+"="+encodeURIComponent(v),onSuccess:parseDS_XML});
}};
XN.ui.DS_XHR=XN.util.DS_XHR;
(function(){
var _15e={};
XN.util.hotKey={add:function(key,func,obj){
key=String(key).toLowerCase();
var ctrl=false;
var alt=false;
var _164=false;
var _165=null;
if(/^\d+$/.test(key)){
_165=parseInt(key);
}else{
ctrl=/ctrl|ctr|c/.test(key);
alt=/alt|a/.test(key);
_164=/shift|s/.test(key);
if(/\d+/.test(key)){
_165=parseInt(/\d+/.exec(key)[0]);
}else{
_165=false;
}
}
_15e[key]=_15e[key]||{};
_15e[key][func]=function(e){
e=e||window.event;
code=e.keyCode;
if(ctrl&&!e.ctrlKey){
return;
}
if(alt&&!e.altKey){
return;
}
if(_164&&!e.shiftKey){
return;
}
if(_165&&code!==_165){
return;
}
func.call(obj||null);
XN.event.stop(e);
};
XN.event.addEvent(document,"keydown",_15e[key][func]);
},del:function(key,func){
key=String(key).toLowerCase();
XN.event.delEvent(document,"keydown",_15e[key][func]);
delete _15e[key][func];
}};
})();
(function(){
var id=0;
XN.util.createObjID=function(){
id++;
return id;
};
})();
XN.DO=XN.Do={};
(function(){
var _16a=null;
var _16b=null;
XN.DO.alert=function(_16c,_16d,type,X,Y,w,h,_173){
try{
_16a.remove();
}
catch(e){
}
var _174={type:"normal",width:400,button:"\u786e\u5b9a",callBack:XN.func.empty,autoHide:0,params:{addIframe:true}};
if(!isString(_16c)){
$extend(_174,_16c);
}
if(isString(_16c)||arguments.length>1){
var ars=arguments;
XN.array.each(["message","title","type","X","Y","width","height","callBack"],function(i,v){
if(ars[i]){
_174[v]=ars[i];
}
});
}
var _178=new XN.ui.dialog(_174.params).setType(_174.type).setTitle(_174.title||(_174.type=="error"?"\u9519\u8bef\u63d0\u793a":"\u63d0\u793a")).setBody(_174.msg||_174.message||"").setWidth(_174.width).setHeight(_174.height).setX(_174.X).setY(_174.Y).addButton({text:(_174.yes||_174.button),onclick:function(){
return _174.callBack.call(_178);
}}).show();
_16a=_178;
if(_174.noFooter){
_178.footer.hide();
}
if(_174.noHeader){
_178.header.hide();
}
try{
_178.getButton(_174.button).focus();
}
catch(e){
}
if(_174.autoHide){
_178.autoHide(_174.autoHide);
}
return _178;
};
var _179=null;
XN.DO.confirm=function(_17a,_17b,_17c,yes,no,X,Y,w,h){
try{
_179.remove();
}
catch(e){
}
var _183={type:"normal",width:400,yes:"\u786e\u5b9a",no:"\u53d6\u6d88",callBack:XN.func.empty,focus:null,params:{addIframe:true}};
if(!isString(_17a)){
$extend(_183,_17a);
}
if(isString(_17a)||arguments.length>1){
var ars=arguments;
XN.array.each(["message","title","callBack","yes","no","X","Y","w","h"],function(i,v){
if(ars[i]){
_183[v]=ars[i];
}
});
}
var _187=new XN.ui.dialog(_183.params).setType(_183.type).setTitle(_183.title||(_183.type=="error"?"\u9519\u8bef\u63d0\u793a":"\u63d0\u793a")).setBody(_183.msg||_183.message||"").setWidth(_183.width).setHeight(_183.height).setX(_183.X).setY(_183.Y).addButton({text:(_183.submit||_183.yes),onclick:function(){
return _183.callBack.call(_187,true);
}}).addButton({text:(_183.cancel||_183.no),onclick:function(){
return _183.callBack.call(_187,false);
}}).show();
_187.getButton(_183.cancel||_183.no).addClass("gray");
if(_183.focus=="submit"){
_183.focus=_183.submit;
}else{
if(_183.focus=="cancel"){
_183.focus=_183.cancel;
}
}
_187.getButton(_183.focus||_183.submit||_183.yes).focus();
_179=_187;
return _187;
};
XN.DO.showMessage=XN.DO.showMsg=function(msg,_189,time){
var _18b=XN.DO.alert({msg:msg,title:(_189||"\u63d0\u793a"),noFooter:true,autoHide:(time||2)});
return _18b;
};
XN.DO.showError=function(msg,_18d,time){
var _18f=XN.DO.alert({msg:msg,type:"error",title:(_18d||"\u9519\u8bef\u63d0\u793a"),noFooter:true,autoHide:(time||2)});
return _18f;
};
})();
XN.json={_ESCAPES:/\\["\\\/bfnrtu]/g,_VALUES:/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS:/(?:^|:|,)(?:\s*\[)+/g,_INVALID:/^[\],:{}\s]*$/,_SPECIAL_CHARS:/["\\\x00-\x1f\x7f-\x9f]/g,_PARSE_DATE:/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/,_CHARS:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},dateToString:function(d){
function _zeroPad(v){
return v<10?"0"+v:v;
}
return "\""+d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z\"";
},stringToDate:function(str){
if(XN.JSON._PARSE_DATE.test(str)){
var d=new Date();
d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);
d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);
return d;
}
},parse:function(str){
return eval("("+str+")");
},build:function(o,w,d){
var m=XN.JSON._CHARS,_199=XN.JSON._SPECIAL_CHARS,_19a=[];
var _19b=function(c){
if(!m[c]){
var a=c.charCodeAt();
m[c]="\\u00"+Math.floor(a/16).toString(16)+(a%16).toString(16);
}
return m[c];
};
var _19e=function(s){
return "\""+s.replace(_199,_19b)+"\"";
};
var _1a0=XN.JSON.dateToString;
var _1a1=function(o,w,d){
var t=typeof o,i,len,j,k,v,vt,a;
if(t==="string"){
return _19e(o);
}
if(t==="boolean"||o instanceof Boolean){
return String(o);
}
if(t==="number"||o instanceof Number){
return isFinite(o)?String(o):"null";
}
if(o instanceof Date){
return _1a0(o);
}
if(isArray(o)){
for(i=_19a.length-1;i>=0;--i){
if(_19a[i]===o){
return "null";
}
}
_19a[_19a.length]=o;
a=[];
if(d>0){
for(i=o.length-1;i>=0;--i){
a[i]=_1a1(o[i],w,d-1)||"null";
}
}
_19a.pop();
return "["+a.join(",")+"]";
}
if(t==="object"){
if(!o){
return "null";
}
for(i=_19a.length-1;i>=0;--i){
if(_19a[i]===o){
return "null";
}
}
_19a[_19a.length]=o;
a=[];
if(d>0){
if(w){
for(i=0,j=0,len=w.length;i<len;++i){
if(typeof w[i]==="string"){
v=_1a1(o[w[i]],w,d-1);
if(v){
a[j++]=_19e(w[i])+":"+v;
}
}
}
}else{
j=0;
for(k in o){
if(typeof k==="string"&&typeof o[k]!="undefined"){
v=_1a1(o[k],w,d-1);
if(v){
a[j++]=_19e(k)+":"+v;
}
}
}
}
}
_19a.pop();
return "{"+a.join(",")+"}";
}
return undefined;
};
d=d>=0?d:1/0;
return _1a1(o,w,d);
}};
XN.JSON=XN.Json=XN.json;
(function(){
writepipe=function(uin,nick){
if(uin>0){
var s=GetCookie("_pipe");
if(s){
s+=":";
}
SetCookie("_pipe",s+uin+":"+escape(nick),null,"/","xiaonei.com");
}
var _1b0=GetCookie("_wi");
if("opening"==_1b0){
}else{
if("running"==_1b0){
}else{
SetCookie("_wi","opening",null,"/",XN.ENV.domain);
window.wiw=window.open("http://xiaonei.com/webpager.do?toid="+uin,"_blank","height=600,width=650,resizable=yes,location=yes");
if(window.wiw_checker){
window.clearInterval(window.wiw_checker);
}
window.wiw_checker=window.setInterval(function(){
if(window.wiw.closed){
window.clearInterval(window.wiw_checker);
SetCookie("_wi","",null,"/",XN.ENV.domain);
}
},1000);
return true;
}
}
try{
if(window.wiw){
window.wiw.focus();
}
}
catch(e){
}
return false;
};
talkto=function(uin,nick,tiny,_1b4){
try{
var a=new ActiveXObject("xntalk.Application");
if(a){
a.openChat("",uin);
return true;
}
}
catch(e){
}
if(top.frames["imengine"].gPagerType==4){
if(top.frames["imengine"].imHelper.isLoginUser()){
var tabs=top.frames["imengine"].imui.chatTabs;
tabs.onActivateWidget(uin,nick,tiny,_1b4);
tabs.switchFocus(uin);
return true;
}
}
try{
writepipe(uin,nick);
}
catch(e){
}
};
jump_and_download=function(link){
if(XN.BROWSER.IE){
window.open(link,"download_window","toolbar=0,location=no,directories=0,status=0,scrollbars=0,resizeable=0,width=1,height=1,top=0,left=0");
window.focus();
}
};
})();
function GetCookieVal(_70){
var _71=document.cookie.indexOf(";",_70);
if(_71==-1){
_71=document.cookie.length;
}
return unescape(document.cookie.substring(_70,_71));
}
function GetCookie(_72){
var arg=_72+"=";
var _74=arg.length;
var _75=document.cookie.length;
var i=0;
while(i<_75){
var j=i+_74;
if(document.cookie.substring(i,j)==arg){
return GetCookieVal(j);
}
i=document.cookie.indexOf(" ",i)+1;
if(i==0){
break;
}
}
return null;
}
function SetCookie(_78,_79){
var _7a=SetCookie.arguments;
var _7b=SetCookie.arguments.length;
var _7c=(_7b>2)?_7a[2]:null;
var _7d=(_7b>3)?_7a[3]:null;
var _7e=(_7b>4)?_7a[4]:null;
var _7f=(_7b>5)?_7a[5]:false;
document.cookie=_78+"="+escape(_79)+((_7c==null)?"":("; expires="+_7c.toGMTString()))+((_7d==null)?"":("; path="+_7d))+((_7e==null)?"":("; domain="+_7e))+((_7f==true)?"; secure":"");
}
var IMHack={};
(function(){
var _1c8=function(_1c9,type,_1cb){
if(!_1cb.$$guid){
_1cb.$$guid=_1c8.guid++;
}
if(!_1c9.events){
_1c9.events={};
}
var _1cc=_1c9.events[type];
if(!_1cc){
_1cc=_1c9.events[type]={};
if(_1c9["on"+type]){
_1cc[0]=_1c9["on"+type];
}
}
_1cc[_1cb.$$guid]=_1cb;
_1c9["on"+type]=_1cd;
};
_1c8.guid=1;
var _1ce=function(_1cf,type,_1d1){
if(_1cf.events&&_1cf.events[type]){
delete _1cf.events[type][_1d1.$$guid];
}
};
var _1cd=function(_1d2){
_1d2=_1d2||window.event;
var _1d3=this.events[_1d2.type];
for(var i in _1d3){
this.$$handleEvent=_1d3[i];
this.$$handleEvent(_1d5(_1d2));
}
};
var _1d5=function(_1d6){
if(_1d6.cancelBubble){
_1d6.stopPropagation=function(){
_1d6.cancelBubble=true;
};
}
return _1d6;
};
var css=function(ele,prop){
for(i in prop){
ele.style[i]=prop[i];
}
};
var _1da=function(){
var h=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
return Math.max(h,_1dc());
};
var _1dd=function(){
var h=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);
return Math.max(h,_1df());
};
var _1df=function(){
return (document.documentElement.clientWidth==0?document.body.clientWidth:document.documentElement.clientWidth);
};
var _1dc=function(){
return (document.documentElement.clientHeight==0?document.body.clientHeight:document.documentElement.clientHeight);
};
var _1e0=function(){
return Math.max(document.body.scrollTop,document.documentElement.scrollTop);
};
var _1e1=function(){
return Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
};
var _1e2=function(obj){
var _1e4={display:obj.style.display,visible:obj.style.visibility};
css(obj,{display:"",visible:"visibility"});
var dim={w:obj.offsetWidth,h:obj.offsetHeight};
css(obj,_1e4);
return dim;
};
var _1e6=function(_1e7,_1e8){
var _1e9=[];
var _1ea=_1e7.getElementsByTagName("*");
var _1eb=new RegExp("\\b"+_1e8+"\\b");
for(var i=0,j=0;i<_1ea.length;i++){
if(_1eb.test(_1ea[i].className)){
_1e9[j++]=_1ea[i];
}
}
return _1e9;
};
var _1ee=null;
var _1ef=null;
var _1f0=function(){
css(_1ee,{display:"none"});
clearTimeout(_1ef);
_1ef=setTimeout(function(){
var dim=_1e2(_1ee);
var top=_1e0()+_1dc()-25;
css(_1ee,{display:"block",top:top+"px",right:"0px"});
},500);
};
IMHack.hackToolBar=function(){
_1ee=document.getElementById("wpiroot");
css(_1ee,{position:"absolute",right:0});
_1c8(window,"scroll",_1f0);
_1c8(window,"resize",_1f0);
};
IMHack.hackWidget=function(ele){
var _1f4=ele.getElementsByTagName("div")[0];
css(_1f4,{position:"absolute",bottom:"23px"});
if(_1e6(ele,"buddy-list").length>0){
css(_1f4,{right:"-62px"});
}else{
if(_1e6(ele,"notifications").length>0){
css(_1f4,{right:"-31px"});
}else{
if(_1e6(ele,"status-control").length>0){
css(_1f4,{right:"-1px"});
}else{
if((/\bm-chat-button-chattab\b/.test(ele.className))){
css(ele,{position:"relative"});
css(_1e6(ele,"m-chat-window")[0],{position:"absolute",right:"-2px",bottom:"23px"});
}else{
css(_1f4,{right:0});
}
}
}
}
};
})();
if(XN.browser.Gecko){
if(XN.string.getQuery("debug_mode")){
XN.debug.on();
}
}
(function(){
if(window.XN){
var _1f5=XN.env.domain;
var _1f6=XN.cookie.get;
var _1f7=window.$element;
var _1f8=XN.dom.ready;
var each=XN.array.each;
var _1fa=XN.string.isBlank;
}
var _1fb="http://shaft.jebe."+_1f5+"/show";
var _1fc="http://jebe.xnimg.cn/";
function buildAD(obj){
XN.log(obj);
var html=[];
var _1ff={};
_1ff[1]=function(ad){
return "<a target=\"_blank\" href=\""+ad.click_url+"\">"+ad.text1.replace(/%%\(.*?\)(.*?)%%/g,"<span style=\"color:red\">$1</span>")+"</a>";
};
_1ff[2]=function(ad){
if(/\.swf$/.test(ad.media_uri)){
var html="<div style=\"position:relative;\">";
html+="<embed src=\""+_1fc+ad.media_uri;
var _203=parseInt(ad.flash_click_type,0);
if(isNaN(_203)){
_203=0;
}
if(_203==1){
html+="?"+ad.flash_click_value+"="+encodeURIComponent(ad.click_url);
}
html+="\" type=\"application/x-shockwave-flash\" "+"width=\""+ad.width+"\" height=\""+ad.height+"\" wmode=\"transparent\" >";
html+="</embed>";
if(_203==0){
html+="<div style=\"filter:alpha(opacity=1);*background-color:#fff;width: "+ad.width+"px; height: "+ad.height+"px;cursor:pointer;position: absolute; left: 0px; top: 0px; z-index: 999;\" onclick=\"window.open('"+ad.click_url+"');\"></div>";
}
html+="</div>";
return html;
}else{
return ["<a target=\"_blank\" href=\""+ad.click_url+"\">","<img width=\""+ad.width+"\"","height=\""+ad.height+"\"","src=\""+_1fc+ad.media_uri+"\""," />","</a>"].join("");
}
};
_1ff[3]=function(ad){
return "";
};
each(obj.ads,function(i,v){
html.push(_1ff[v.format](v));
});
var div=$("ad"+obj.adzoneid);
if(!div){
return;
}
div.innerHTML=html.join("");
}
window.render_jebe_ads=function(json){
if($("banner")){
$("banner").show();
}
if($("bannerBottom")){
$("bannerBottom").show();
}
XN.array.each(["1000000005","1000000006","1000000015","1000000016","1000000017","1000000018","1000000019"],function(i,v){
var el=$("ad"+v);
if(el){
el.show();
}
});
var ads=json.result;
each(ads,function(i,v){
buildAD(v);
});
};
window.load_jebe_ads=function(s){
if(!s){
return;
}
_1f8(function(){
function checkLoad(){
setTimeout(function(){
XN.array.each(["1000000005","1000000006","1000000015","1000000016","1000000017","1000000018","1000000019"],function(i,v){
var el=$("ad"+v);
if(!el){
return;
}
if(_1fa(el.innerHTML)){
el.hide();
}
});
var tl=$("ad1000000003"),tr=$("ad1000000004"),bl=$("ad1000000007"),br=$("ad1000000008");
if(tl&&tr&&_1fa(tl.innerHTML)&&_1fa(tr.innerHTML)){
if($("banner")){
$("banner").hide();
}
}
if(bl&&br&&_1fa(bl.innerHTML)&&_1fa(br.innerHTML)){
if($("bannerBottom")){
$("bannerBottom").hide();
}
}
},1000);
}
var p=_1f6("jebecookies");
if(!p||_1fa(p)){
p="100|||||";
}
var sc=_1f7("script");
sc.type="text/javascript";
sc.src=_1fb+"?j="+encodeURIComponent(p);
if(XN.browser.IE){
sc.onreadystatechange=function(){
if((this.readyState=="loaded"||this.readyState=="complete")){
checkLoad();
}
};
}else{
sc.onload=function(){
checkLoad();
};
}
setTimeout(checkLoad,10*1000);
document.body.appendChild(sc);
});
};
})();
XN.USER=XN.User={};
XN.USER.me=function(_219){
};
currentUser={};
XN.EVENT.enableCustomEvent(currentUser);
XN.USER.addFriendAction=function(p){
this.config={commentLength:45,needComment:true,requestURI:"/ajax_request_friend.do"};
$extend(this.config,p);
};
XN.USER.addFriendAction.prototype={getConfig:function(key){
return this.config[key];
},send:function(id,why,from){
var This=this;
if(this.getConfig("needComment")){
if(XN.STRING.isBlank(why)){
this.fireEvent("checkError","\u60a8\u8f93\u5165\u7684\u4fe1\u606f\u4e0d\u80fd\u4e3a\u7a7a");
return;
}
}
if(why.length>this.getConfig("commentLength")){
this.fireEvent("checkError","\u60a8\u8f93\u5165\u7684\u4fe1\u606f\u4e0d\u80fd\u8d85\u8fc7"+this.getConfig("commentLength")+"\u4e2a\u5b57\u7b26");
return;
}
var data="id="+id+"&why="+why+"&from="+from;
this.fireEvent("beforePost");
new XN.NET.xmlhttp({url:this.getConfig("requestURI"),"data":data,onSuccess:function(r){
r=r.responseText;
This.fireEvent("success",id,r,from);
if(!window.currentUser){
return;
}
if(currentUser.fireEvent){
currentUser.fireEvent("addFriendSuccess",id,r,from);
}
if(currentUser.onaddFriendSuccess){
currentUser.onaddFriendSuccess(id,r);
}
},onError:function(){
This.fireEvent("error",id,from);
if(!window.currentUser){
return;
}
currentUser.fireEvent("addFriendError",id,r,from);
}});
}};
XN.EVENT.enableCustomEvent(XN.USER.addFriendAction.prototype);
XN.DOM.readyDo(function(){
var _222=null;
var user=null;
function loadingDialog(){
_222=XN.DO.confirm({title:"\u5c06"+user.name+"\u52a0\u4e3a\u597d\u53cb?",msg:"<div style=\"font-size: 14px;  height:100px; line-height: 1.8em; padding-left: 20px;\" class=\"clearfix\"><div style=\"padding: 4px; background: transparent url("+XN.ENV.staticRoot+"imgpro/bg/picholder59.gif) no-repeat scroll 0% 0%;width: 59px; height: 59px; float: left;\"><a href=\"#\" style=\"background: transparent url("+user.head_url+") no-repeat scroll center center;height: 50px; width: 50px; display: block;\">&nbsp;</a></div><div style=\"margin-left: 10px; height: 30px; float: left;width:240px;font-size:12px;\"><h3 style=\"margin-top:15px;\"><img style=\"display:block;float:left;margin:5px 10px 0 0;\" src=\""+XN.ENV.staticRoot+"/img/indicator.gif\" />Loading...</h3></div></div>",width:400});
_222.footer.style.display="none";
}
function getMessage(_224,_225,_226){
var _227=_224==""?"none":"block";
var _228=_225?"none":"block";
var html=["<div style=\"width:370px;padding:4px;color:#EF4223;background-color:#FEFFCF;position:relative;top:-10px;left:-10px;_margin-bottom:0;\">\u9700\u8981\u901a\u8fc7<em>",user.name,"</em>\u7684\u9a8c\u8bc1\u624d\u80fd\u52a0",_226,"\u4e3a\u597d\u53cb\uff01</div>","<div style=\"padding: 4px; background: transparent url(",XN.ENV.staticRoot,"imgpro/bg/picholder59.gif) no-repeat scroll 0% 0%;width: 59px; height: 59px; float: left;\"><a href=\"#\" style=\"background: transparent url(",user.head_url,") no-repeat scroll center center; height: 50px; width: 50px; display: block;\">&nbsp;</a></div>","<div id=\"addFriendAlert\" style=\"float: left;width:265px;\">","<h4 style=\"display:",_227,";margin-bottom:10px;\">",user.name,"\u8bf4: <span style=\"font-weight: 400;\">",_224,"</span></h4>","<p style=\"margin: 0 0 10px 0;\">","<textarea id=\"addFriendMessage\" style=\"border: 1px solid #B8D4E8; width: 100%; height:50px;color: gray;\" title=\"\u9644\u52a0\u4fe1\u606f(\u9009\u586b\uff0c45\u5b57\u5185)\" onfocus=\"if(this.value==this.title)this.value='';\" onblur=\"if(this.value=='')this.value=this.title;\">\u9644\u52a0\u4fe1\u606f(\u9009\u586b\uff0c45\u5b57\u5185)</textarea>","</p>","<div style=\"display:",_228,";clear:both;text-align:center;\"><a style=\"font-size:12px;\" target=\"_blank\" href=\"http://head.upload.xiaonei.com/Upload.do?from=friend\">\u4f7f\u7528\u771f\u5b9e\u5934\u50cf\uff0c\u63d0\u9ad8\u8bf7\u6c42\u901a\u8fc7\u7387</a></div>","</div><div style=\"clear:both;\"></div>"];
return html.join("");
}
function requestDialog(_22a,_22b,_22c){
_222=XN.DO.confirm({title:"\u5c06"+user.name+"\u52a0\u4e3a\u597d\u53cb?",msg:getMessage(_22a,_22b,_22c),width:400,callBack:function(r){
if(r){
var obj=$("addFriendMessage");
var why=obj.value==obj.title?"":obj.value;
getAction().send(user.id,why,user.from);
}
}});
_222.footer.style.display="";
}
function beforePost(){
$("addFriendAlert").innerHTML="\u6b63\u5728\u53d1\u9001\u8bf7\u6c42...";
_222.footer.hide();
try{
_222.preventHide();
}
catch(e){
_222.show();
}
}
function recommendFriend(){
if(typeof showRecommendedFriendDialog!="undefined"){
showRecommendedFriendDialog(user.id,user.name,1,true);
}else{
XN.loadFile("http://s.xnimg.cn/csspro/apps/profile.css");
XN.loadFile("http://s.xnimg.cn/jspro/xn.app.recommendFriend.js",function(){
showRecommendedFriendDialog(user.id,user.name,1,true);
});
}
}
function success(id,_231){
var This=this;
if(isJSON(_231)){
var msg=XN.JSON.parse(_231);
}else{
var msg={code:0,targetfriendcount:100,message:_231};
}
if(msg.code==0||msg.code==1){
if(msg.targetfriendcount<=12){
_222.hide();
recommendFriend();
}else{
$("addFriendAlert").innerHTML=msg.message;
setTimeout(function(){
_222.hide();
},1500);
}
if(user.action){
try{
eval(user.action);
}
catch(e){
}
}
if(user.callback){
user.callback(user.id);
}
}else{
_222.hide();
XN.DO.alert({title:"\u597d\u53cb\u7533\u8bf7\u5931\u8d25",message:"<p style='margin:10px;'>"+msg.message+"</p>"});
}
}
function initUser(args){
if(!/^\d+$/.test(args[0])){
user={id:args[1],name:args[2],head_url:args[3],star:true,from:args[4],action:args[5]};
}else{
user={id:args[0],name:args[1],head_url:args[2],star:args[3],from:args[4],callback:args[5]};
}
}
function getAction(){
var _235=new XN.USER.addFriendAction({needComment:false});
_235.addEvent("beforePost",beforePost);
_235.addEvent("success",success);
_235.addEvent("checkError",function(_236){
_222.hide();
XN.DO.showError(_236,"\u9519\u8bef\u63d0\u793a",2);
setTimeout(function(){
_222.show();
},2000);
});
_235.addEvent("error",function(id,_238){
_222.hide();
XN.DO.showError(_238);
});
return _235;
}
window.showRequestFriendDialog=function(uid,name,head,star,from,_23e){
initUser(arguments);
loadingDialog();
new XN.NET.xmlhttp({url:"/GetFriendCue.do",method:"get",data:"id="+user.id,onSuccess:function(r){
try{
var _240=XN.JSON.parse(r.responseText);
var _241=_240.type==0?"":_240.content;
var _242=_240.isTrue?true:false;
var _243=_240.ta===false?"\u5979":"\u4ed6";
requestDialog(_241,_242,_243);
}
catch(e){
requestDialog("",true,"TA");
}
},onError:function(r){
_222.hide();
requestDialog("",true,"TA");
}});
};
});
(function(){
if(!XN.browser.IE){
return;
}
var _245="";
XN.dom.ready(function(){
_245=document.getElementsByTagName("title")[0].innerHTML;
});
XN.event.addEvent(window,"load",function(){
setTimeout(function(){
document.title=_245;
},1000);
});
})();

